package com.cy.ppj.dao.mapper.customer;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.cy.ppj.model.domian.customer.CustomerImage;
import com.cy.ppj.model.enums.customer.CustomerImageType;
import com.cy.ppj.model.vo.customer.CustomerImageListVO;

import tk.mybatis.mapper.common.BaseMapper;

/**
 * CustomerImageMapper
 *
 * @author tanyilin
 *
 * @create 2019年2月25日 上午11:38:59
 */
@Mapper
public interface CustomerImageMapper extends BaseMapper<CustomerImage> {

	/**
	 * 批量新增
	 * 
	 * @param customerImageList
	 */
	void insertBatch(@Param("customerImageList") List<CustomerImage> customerImageList);

	/**
	 * 根据更新时间删除无效数据
	 * @param customerId
	 * @param type
	 * @param updateTime
	 * @return void
	 */
	void deleteByUpdateTime(@Param("customerId") Long customerId, @Param("type") CustomerImageType type, @Param("updateTime") Date updateTime);

	/**
	 * 查询客户图片列表
	 * 
	 * @param customerId
	 * @param type
	 * @return
	 */
	List<CustomerImageListVO> selectCustomerImageListByCustomerId(@Param("customerId") Long customerId, @Param("type") CustomerImageType type);

	
}
